package com.gxa.service.impl;

import com.gxa.mapper.ExrecordMapper;
import com.gxa.service.ExrecordService;
import com.gxa.vo.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ExrecordServiceImpl implements ExrecordService {

    @Autowired
    private ExrecordMapper exrecordMapper;
    @Override
    public List<OutexrecordVo> queryAll() {

        List<OutexrecordVo> outexrecordVos = this.exrecordMapper.queryAll();
        return outexrecordVos;

    }

    @Override
    public List<OutexrecordVo> selectAll(String begintime,String endtime, String namecard) {

        List<OutexrecordVo> outexrecordVos1 = this.exrecordMapper.selectAll(begintime,endtime,namecard);
        System.out.println(outexrecordVos1);
        return outexrecordVos1;
    }

    @Override
    public List<PatientmsgVo> queryAllpmsg(String medcard) {
        List<PatientmsgVo> patientmsgVos = this.exrecordMapper.queryAllpmsg(medcard);
        return patientmsgVos;
    }

    @Override
    public List<OrderexmsgVo> queryAllomsg(String ordernum) {
        List<OrderexmsgVo> orderexmsgVos = this.exrecordMapper.queryAllomsg(ordernum);

        return orderexmsgVos;
    }

    @Override
    public void updateRemark(String ordernum, String remark) {

        this.exrecordMapper.updateRemark(ordernum,remark);

    }

    @Override
    public List<HosexrecordVo> queryAllHos() {

        List<HosexrecordVo> hosexrecordVos = this.exrecordMapper.queryAllHos();
        return hosexrecordVos;
    }

    @Override
    public List<HosexrecordVo> selectAllHos(String begintime,String endtime,String namehospital) {

        List<HosexrecordVo> hosexrecordVos = this.exrecordMapper.selectAllHos(begintime,endtime,namehospital);
        return hosexrecordVos;
    }

    @Override
    public String querymedcard(String hospital) {
        String querymedcard = this.exrecordMapper.querymedcard(hospital);
        return querymedcard;
    }

    @Override
    public List<PatientmsgVo> queryAllphosmsg(String medcard) {

        List<PatientmsgVo> patientmsgVos = this.exrecordMapper.queryAllpmsg(medcard);
                return patientmsgVos;
    }

    @Override
    public List<OrderexmsgVo> queryAllohosmsg(String ordernum) {
        List<OrderexmsgVo> orderexmsgVos = this.exrecordMapper.queryAllomsg(ordernum);
        return orderexmsgVos;
    }


}
